package com.anda.logistics.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.anda.logistics.dao.SystemRightsDao;
import com.anda.logistics.model.SystemMenuRights;
import com.anda.logistics.service.SystemRightsService;
import com.anda.logistics.util.JQGridPager;
@Component
public class SystemRightsServiceImpl implements SystemRightsService {
	private SystemRightsDao systemRightsDao;
	
	
	public SystemRightsDao getSystemRightsDao() {
		return systemRightsDao;
	}
	@Resource
	public void setSystemRightsDao(SystemRightsDao systemRightsDao) {
		this.systemRightsDao = systemRightsDao;
	}

	@Override
	public List<SystemMenuRights> getPagerList(JQGridPager pager) {
		return systemRightsDao.getPagerList(pager);
	}

	@Override
	public long getPagerRecords(JQGridPager pager) {
		return systemRightsDao.getPagerRecords(pager);
	}
	@Override
	public void save(SystemMenuRights smr) {
		systemRightsDao.save(smr);		
	}
	@Override
	public void update(SystemMenuRights smr) {
		systemRightsDao.update(smr);		
	}
	@Override
	public void deleteAll(String[] ids) {
		for(String sid: ids){
			systemRightsDao.delete(Integer.parseInt(sid));
		}
		
	}
	@Override
	public List<SystemMenuRights> getAll() {
		return systemRightsDao.getAll();
	}

}
